{% extends "admin_base.html" %}
{% block content %}
<div class="card" style="max-width:600px;margin:0 auto;">
    <h2 class="text-xl font-bold mb-6">编辑设备</h2>
    <form method="post" action="">
        <div style="margin-bottom:20px;">
            <label class="text-gray-700" for="name">设备名称</label><br>
            <input type="text" id="name" name="name" value="{{ device.name }}" style="width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:4px;">
        </div>
        <div style="margin-bottom:20px;">
            <label class="text-gray-700" for="device_type">设备类型</label><br>
            <input type="text" id="device_type" name="device_type" value="{{ device.device_type }}" style="width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:4px;">
        </div>
        <div style="margin-bottom:20px;">
            <label class="text-gray-700" for="device_id">设备ID</label><br>
            <input type="text" id="device_id" name="device_id" value="{{ device.device_id }}" readonly style="width:100%;padding:8px 12px;border:1px solid #eee;background:#f3f4f6;border-radius:4px;">
        </div>
        <div style="display:flex;gap:16px;">
            <button type="submit" class="btn">保存</button>
            <a href="{{ url_for('pages.admin_devices') }}" class="btn" style="background:#6B7280;">返回</a>
        </div>
    </form>
</div>
{% endblock %} 